﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Watcher
{
    class Logger
    {
        private static Logger instance; 
        private StreamWriter OpenedFile;

        private Logger()
        {
            OpenedFile = new StreamWriter("C:/Users/lnx/Documents/Visual Studio 2010/Projects/BirdWatcher/Transport/values.txt");
        }
        public void WriteToFile(string Value)
        {
            OpenedFile.WriteLine(Value);
            Console.WriteLine("Value written: " + Value);
        }

        public static Logger getInstance() {
            if(instance == null)
                instance = new Logger();
            return instance;
        }

        public void Close()
        {
            OpenedFile.Close();
        }
    }
}
